home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 43 / Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso / -serious- / hardware / adflib / adflibppc / lib / adf_defs.h < prev    next >
C/C++ Source or Header  |  1999-06-14  |  953b  |  53 lines

  1. /*
  2.  *  ADF Library. (C) 1997-1998 Laurent Clevy
  3.  *
  4.  *  adf_defs.h
  5.  *
  6.  * 
  7.  */
  8.  
  9.  
  10. #ifndef _ADF_DEFS_H
  11. #define _ADF_DEFS_H 1
  12.  
  13. #define ADFLIB_VERSION "0.7.8a"
  14. #define ADFLIB_DATE "26 may 1999"
  15.  
  16. #define SECTNUM long
  17. #define RETCODE long
  18.  
  19. #define TRUE    1
  20. #define FALSE   0
  21.  
  22. #define ULONG   unsigned long
  23. #define USHORT  unsigned short
  24. #define UCHAR   unsigned char
  25. #define BOOL    int
  26.  
  27.  
  28. /* defines max and min */
  29.  
  30. #ifndef max
  31. #define max(a,b)        (a)>(b) ? (a) : (b)
  32. #endif
  33. #ifndef min
  34. #define min(a,b)        (a)<(b) ? (a) : (b)
  35. #endif
  36.  
  37.  
  38. /* (*byte) to (*short) and (*byte) to (*long) conversion */
  39.  
  40. #define Short(p) ((p)[0]<<8 | (p)[1])
  41. #define Long(p) (Short(p)<<16 | Short(p+2))
  42.  
  43.  
  44. /* swap short and swap long macros for little endian machines */
  45.  
  46. #define swapShort(p) ((p)[0]<<8 | (p)[1])
  47. #define swapLong(p) (swapShort(p)<<16 | swapShort(p+2))
  48.  
  49.  
  50.  
  51. #endif /* _ADF_DEFS_H */
  52. /*##########################################################################*/
  53.